#pragma once
#include "DXAMLCommon.h"
#include "CXcpObjectBase.h"
#include "IPALSettingsDictionaryNode.h"
#include "CXcpObjectThreadSafeAddRefPolicy.h"



class CProxySettingsDictionary :
	public CXcpObjectBase<IPALSettingsDictionaryNode,CXcpObjectThreadSafeAddRefPolicy>
{
public: 
	static HRESULT Create(struct IPALSettingsDictionaryNode *, CProxySettingsDictionary * *);
	HRESULT SetDictionary(struct IPALSettingsDictionaryNode *);
	virtual const CXString * GetName();
	virtual enum SettingsNodeType::Value GetType();
	virtual HRESULT GetChild(const CXString *, struct IPALSettingsNode * *);
	virtual HRESULT GetChild(const XUINT16 *, struct IPALSettingsNode * *);
	virtual HRESULT AddChildInteger(const CXString *, XUINT32, struct IPALSettingsIntegerNode * *);
	virtual HRESULT AddChildInteger(const XUINT16 *, XUINT32, struct IPALSettingsIntegerNode * *);
	virtual HRESULT AddChildString(const CXString *, const CXString *, struct IPALSettingsStringNode * *);
	virtual HRESULT AddChildString(const XUINT16 *, const XUINT16 *, struct IPALSettingsStringNode * *);
	virtual HRESULT AddChildDictionary(const CXString *, struct IPALSettingsDictionaryNode * *);
	virtual HRESULT AddChildDictionary(const XUINT16 *, struct IPALSettingsDictionaryNode * *);
	virtual HRESULT RemoveChild(const CXString *);
	virtual HRESULT RemoveChild(const XUINT16 *);
	virtual HRESULT Flush();
	virtual HRESULT GetChildEnumerator(struct IPALSettingsNodeEnumerator * *, enum SettingsNodeType::Value);
protected: 
	CProxySettingsDictionary();
	virtual ~CProxySettingsDictionary();
	HRESULT Initialize(struct IPALSettingsDictionaryNode *);
	xref_ptr<IPALSettingsDictionaryNode> m_Dictionary;
};